#include <stdio.h>
#include <math.h>

// > 0
void f1(float a, float b, float c, float delta) 
{
    float x1, x2;
    x1 = (-b + sqrt(delta)) / (2 * a);
    x2 = (-b - sqrt(delta)) / (2 * a);
    printf("x1=%.2f;x2=%.2f", x1, x2);
}

// = 0.
void f2(float a, float b, float c, float delta)
{
    float x1, x2;
    x1 = -b / (2 * a);
    x2 = -b  / (2 * a);
    printf("x1=%.2f;x2=%.2f", x1, x2);
}

// < 0
void f3(float a, float b, float c, float delta)
{
    float shi, xu;
    shi = -b / (2 * a);
    xu = sqrt(-delta) / (2 * a);
    printf("x1=%.2f+%.2fi;x2=%.2f-%.2fi", shi, xu, shi, xu);
}

int main() {
    float a, b, c, delta;
    scanf("%f,%f,%f", &a, &b, &c);
    delta = b*b - 4*a*c;
    if (delta > 0) 
    {
        f1(a, b, c, delta);
    }
    else if (delta == 0)
    {
        f2(a, b, c, delta);
    }
    else 
    {
        f3(a, b, c, delta);
    }
    return 0;
}